/*
 * tmr.h
 *
 * Created: 6/13/2013 3:27:52 PM
 *  Author: Tim
 */ 


#ifndef TMR_H_
#define TMR_H_


//use to gain access to status type
#include "../../packets/status.h"

//for access to allocations
#include "../allocations.h"

#include "../dio/dio.h"

//check to see if there is a free timer
//if so the next in line free timer will be indicated by the function return
tmrAlloc_t tmrCheckAvailability();

tmrAlloc_t tmrCheckFrequency(uint16_t freq);

//returns the number of unused timers
uint8_t tmrNumAvailabile();

//timer interrupt
status_t tmrSetupFreq(uint16_t freq);

//timer interrupt handler for timers
void timerInterruptHandler();

#endif /* TMR_H_ */